# Contributor: Grigory Kirillov <txgk@bk.ru>
# Maintainer:
pkgname=libhomfly
pkgver=1.02_p6
_pkgver=${pkgver//_p/r}
pkgrel=1
pkgdesc="Library to compute the homfly polynomial of a link"
url="https://github.com/miguelmarco/libhomfly"
arch="all"
license="Unlicense"
makedepends="gc-dev"
subpackages="$pkgname-dev"
source="https://github.com/miguelmarco/libhomfly/releases/download/$_pkgver/libhomfly-$_pkgver.tar.gz"
builddir=$srcdir/libhomfly-$_pkgver

build() {
	export CFLAGS="${CFLAGS/-Os/-O3}" # gotta go fast

	./configure \
		--target="$CTARGET" \
		--build="$CBUILD" \
		--host="$CHOST" \
		--prefix=/usr
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
44f81815a0ba4c0358d433eb9769944af2ee02790d78aaa08e791d03ba68ba3dcf0389b4287f687211e6a7ba84e1bea3d2ebe69fc8bb4f12d677b7f54872d618  libhomfly-1.02r6.tar.gz
"
